Page({
  data: {
    words: [
      {
        id: 1,
        word: 'apple',
        similarity: 0
      },
      {
        id: 2,
        word: 'banana',
        similarity: 0
      }
    ]
  },
  playSound(e) {
    const wordId = e.currentTarget.dataset.id;
    // 这里添加播放标准发音逻辑
  },
  record(e) {
    const wordId = e.currentTarget.dataset.id;
    // 这里添加跟读录音和相似度计算逻辑
    // 假设计算出相似度后更新数据
    const words = this.data.words;
    const index = words.findIndex(word => word.id === wordId);
    words[index].similarity = 70; // 假设相似度为70%
    this.setData({
      words
    });
  }
})